<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <link rel="stylesheet" th:href="@{/css/GoodLists.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">


</head>
<body>

<!-- 快捷导航 -->
<div class="shortcut">
  <div class="wrapper">
    <ul>
      <li><a th:href="@{/business/addGoods}">返回添加商品页面</a></li>
      <li><a href="#">联系客服</a></li>
      <li><a th:href="@{|/page/${1}/${session.user.getUserId()}|}">返回首页</a></li>
    </ul>
  </div>
</div>

<div class="container">

  <div class="context">

    <p>你的商品列表</p>

    <div class="GoodList">

      <table class="table" border="1px" cellspacing="0">
        <tr class="tr_th">
          <th>图片</th>
          <th>名称</th>
          <th>类型</th>
          <th>库存</th>
          <th>操作</th>
        </tr>
        <tr class="tr_td" th:each="product : ${productBaseList}" th:object="${product}"  >
            <td><img th:src="@{|/userImg/*{productImg}|}"></td>
            <td th:text="*{getProductName()}">羽绒服</td>
            <td th:text="*{getType().productTypeName}">服装</td>
            <td th:if="*{getProductCount() > 5}" th:text="*{getProductCount()}">200</td>
            <td th:if="*{getProductCount() <= 5}" style="border: 5px solid red" th:text="*{getProductCount()}">200</td>
            <th><a th:href="@{|/business/delProduct/*{productId}|}">删除</a></th>
        </tr>

      </table>
    </div>
  </div>
</div>

</body>
</html>